package com.fary.aop.config;

import com.fary.aop.targetsource.CustomTargetSourceCreator;
import org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AopConfig {

    @Autowired
    public void setCustomTargetSourceCreator (AnnotationAwareAspectJAutoProxyCreator autoProxyCreator) {
        autoProxyCreator.setCustomTargetSourceCreators(new CustomTargetSourceCreator());
    }
}
